package dobest.ray.com.jiongjiong.logicCache.cacheBaseLogic;

import android.content.Context;

import com.dobest.ray.corelibs.logic.BaseLogic;

import dobest.ray.com.jiongjiong.bean.BaseData;
import dobest.ray.com.jiongjiong.constants.Urls;
import dobest.ray.com.jiongjiong.logicCache.BaseManagerCache;


public class HomePageManager extends BaseManagerCache {
    public void getVisionData(Context c, String uid,
                              BaseLogic.NListener<BaseData> l) {

        logic.edit(c).addParam("uid", uid).setUrl(Urls.GET_FAR_VISION_URL).setListener(l)
                .setBaseClass(BaseData.class);
        logic.doPost();
    }


    /**
     * 获取档案列表
     *
     * @param c
     * @param uid
     * @param pageSize
     * @param currentPage
     * @param l
     */
    public void getAchiveListData(Context c, String uid, String pageSize, String currentPage, BaseLogic.NListener<BaseData> l) {
        logic.edit(c).addParam("uid", uid).addParam("pageSize", pageSize).addParam("currentPage", currentPage).setUrl(Urls.GET_ARCHIVE_LIST_DATA).setListener(l)
                .setBaseClass(BaseData.class);
        logic.doPost();

    }


    /**
     * 获取档案详情
     *
     * @param context
     * @param uid
     * @param id
     * @param type
     * @param l
     */
    public void getArchiveDetail(Context context, String uid, String id, String type, BaseLogic.NListener<BaseData> l) {
        logic.edit(context).addParam("uid", uid).addParam("id", id).addParam("type", type).setUrl(Urls.GET_ARCHIVE_DETAILS).setListener(l)
                .setBaseClass(BaseData.class);
        logic.doPost();
    }
}
